package cn.com.cym.gamezao.entity.demo;

import cn.com.cym.gamezao.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
@Entity
@Table(name ="x_father")
@ApiModel(description = "子类")
public class Father extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1054724132693592124L;

    private String code;

    private String name;

    @OneToOne(mappedBy="father",fetch = FetchType.EAGER)
    private SingleChild singleChild;
}
